﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using YFIN.View.ProductServiceRef;
using YFIN.View.ViewModels;

namespace YFIN.View.Toolkit
{
    public partial class Product : UserControl
    {
        ProductVM _pvm;
        private static Product _p;
        public Product()
        {
            InitializeComponent();
            _pvm = new ProductVM();
            this.DataContext = _pvm;
            _p = this;
        }
        private void edit_Click(object sender, RoutedEventArgs e)
        {
            _pvm.Update(((Button)sender).DataContext);
        }

        public static void Update()
        {
            _p._pvm.UpdatePro();
        }
    }
}
